<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
{#<form action="" method="get">#}
{#    {% for i in list %}#}
{#        <a href="">{{ i.name }}</a>&nbsp;&nbsp;{{ i.create }}&nbsp;&nbsp;{{ i.author.name }}#}
{#        <br>#}
{#    {% endfor %}#}
{##}
{#</form>#}
<a href="{% url 'add_article' %}">添加</a>
<table border="1" cellspacing="0">
    <tr>
        <th>名称</th>
        <th>内容</th>
        <th>发布时间</th>
        <th>版本</th>
        <th>作者(点击详情)</th>
        <th colspan="2">操作</th>
    </tr>
    {% for i in pagex %}
    <tr>
        <td>{{ i.name }}</td>
        <td>{{ i.content }}</td>
        <td>{{ i.create }}</td>
        <td>{{ i.banben }}</td>
        <td><a href="">{{ i.author.name }}</a></td>
        <td><a href="{% url 'del_article' i.id %}">删除</a></td>
        <td><a href="{% url 'edit_article' i.id %}">修改</a></td>
    </tr>
    {% endfor %}
</table>
{#{% for page in pagex %}#}
{#    <a href="{% url 'index' %}">{{ pagex.number }}</a>#}
{#{% endfor %}#}
{% if pagex.number > 1 %}
    <a href="{% url 'index' %}?page={{ pagex.number|add:-1 }}">上一页</a>
{% endif %}

&nbsp;&nbsp;<b>当前页{{ pagex.number }}

    {% if hasnext %}
        </b> &nbsp;&nbsp;<a href="{% url 'index' %}?page={{ pagex.number|add:1 }}">下一页</a>
    {% endif %}
</body>
</html>